#region Copyright
// 
// Copyright (C) 2008 VirtualStaticVoid <virtualstaticvoid@gmail.com>
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#endregion

using System;

namespace NAom.Core
{

  public interface IDynamicTypeFactory
  {
    Type GeneratedType { get; }
    ReadOnlyNamedItemCollection<IPropertyType> Properties { get; }
    IDynamicType DynamicType { get; }
    object CreateInstance(params object[] args);
  }

  public interface IDynamicTypeFactory<TType> : IDynamicTypeFactory
    where TType : class
  {

    new DynamicType<TType> DynamicType { get; }

    TType CreateInstance();

    TType CreateInstance<TArg1>(TArg1 arg1);

    TType CreateInstance<TArg1, TArg2>(TArg1 arg1, TArg2 arg2);
    
    TType CreateInstance<TArg1, TArg2, TArg3>(TArg1 arg1, TArg2 arg2, TArg3 arg3);
    
    TType CreateInstance<TArg1, TArg2, TArg3, TArg4>(TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4);
    
    TType CreateInstance<TArg1, TArg2, TArg3, TArg4, TArg5>(TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4, TArg5 arg5);

    TType CreateInstance<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6>(TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4,
                                                                   TArg5 arg5, TArg6 arg6);

    TType CreateInstance<TArg1, TArg2, TArg3, TArg4, TArg5, TArg6, TArg7>(TArg1 arg1, TArg2 arg2, TArg3 arg3, TArg4 arg4,
                                                                          TArg5 arg5, TArg6 arg6, TArg7 arg7);

    new TType CreateInstance(params object[] args);
    
  }
}
